package com.kma.summer2012.client.view.rejectrequest;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.*;
import com.kma.summer2012.client.presenters.reject.RejectPresenter;
import com.kma.summer2012.client.styles.style2.Recources;


/**
 * Created by IntelliJ IDEA.
 * User: HP
 * Date: 05.02.13
 * Time: 21:20
 * To change this template use File | Settings | File Templates.
 */
public class RejectView extends Composite implements RejectPresenter.Display {

    interface RejectViewUiBinder extends UiBinder<Widget, RejectView> {
    }

    private static RejectViewUiBinder uiBinder = GWT.create(RejectViewUiBinder.class);

    public RejectView() {
        HTMLPanel rootElement = (HTMLPanel) uiBinder.createAndBindUi(this);
        rejectRequest.addStyleName(Recources.INSTANCE.styles().Caption());
        cancelRequest.addStyleName(Recources.INSTANCE.styles().Caption());
        pageTitle.addStyleName(Recources.INSTANCE.styles().titleCatalog());

        initWidget(rootElement);
        table.setStyleName(Recources.INSTANCE.styles().ShowRejectTable());


    }


    @UiField
    TextArea text;
    @UiField
    protected Label pageTitle;
    @UiField
    Grid table;

    @UiField
    Button rejectRequest;

    @UiField
    Button cancelRequest;
    @Override
    public HasClickHandlers getrejectButton() {
        return rejectRequest;
    }

    @Override
    public HasClickHandlers getcancelButton() {
        return cancelRequest;
    }

    @Override
    public String getrichText() {
        return text.getText();
    }
    public Widget asWidget() {
        return this;
    }

}
